<template>
	<view class="main">
		<view class="conttitle" style="cursor: pointer;">
			<view style="height: 100%;">
				<view style="margin-top: 10px;" class="name"><span>剑魂</span><span>本人</span></view>
				<view style="margin-top: 20px;" class="phone">622*********0909</view>
			</view>
			<view style="margin-top: 20px;" class="mor">
				默认就诊人
			</view>
		</view>
		<!-- <view class="">
			科室-保健科
		</view> -->
		<view class="sthtitle">
			选择预约时间
		</view>
		<view class="timeselect">
			<view class="week ali">
				<view class="flex1 weeklist" v-for="(item,index) in week">
					{{index==0?'今日':week[index]}}
				</view>
			</view>
			<view class="datelist ali">
				<view class="flex1 date" :class=" chooseindex==index?'choosed ':''" @click="chooseindex=index"
					v-for="(item,index) in dates" :key="index">
					{{item}}
				</view>
			</view>
		</view>
		<view class="sthtitle">
			套餐详情
		</view>
		<view class="taocanlist">
			<view class="flex ali tcsection">
				<view class="taocantitle">
					一般套餐
				</view>
				<view class="price right">
					￥100.99
				</view>
			</view>
		</view>
		<view class="fixedmenu flex">
			<view class="total flex1 ali">
				<view class="">
					合计：
				</view>
				<view class="price">
					<text class="">150.00</text>
				</view>
			</view>
			<view class="nextbtn flex1 allcenter" @click="next">
				下一步
			</view>
		</view>
		<view class="needtoknow">
			<view class="">
				预约须知
			</view>
			<view class="">
				1.套餐内的项目为固定项目，不可增减。
			</view>
			<view class="">
				2.您可以选择一周内的号源，每周三早10点开放下一周号源。
			</view>
			<view class="">
				3、体检当日至我院至门诊楼三楼领取排队号。
			</view>
			<view class="">
				4、预约成功后如须退款，请于我院退费窗口办理。
			</view>


		</view>
	</view>
	</view>
</template>
<script>
	export default{
		data(){
			return{
				chooseindex: 0,
				dates: [],
				week: [],
			}
		},
		methods:{
			next(){
				uni.navigateTo({
					url:'/query/page/ConfirmAppointment/ConfirmAppointment'
				})
			}
		},
		mounted() {
			var weeks = new Array("周日", "周一", "周二", "周三", "周四", "周五", "周六");
			const today = new Date().toISOString().slice(0, 10);
			const dates = [];
			for (let i = 0; i < 7; i++) {
				const date = new Date(Date.parse(today) + i * 24 * 60 * 60 * 1000).toISOString().slice(0, 10);
				dates.push(date);
				this.dates.push(new Date(date).getDate())
				this.week.push(weeks[new Date(date).getDay()])
			}
		}
	}
</script>
<style>
	/* 	page {
		background-color: #FFFAFA;
	} */

	.main {
		width: 92%;
		margin: 0 auto;
	}

	.timeselect {
		background-color: #fff;
		height: 190rpx;
		box-sizing: border-box;
		border: 1rpx solid #f2f2f2;
		padding-top: 20rpx;

	}

	.ali {
		display: flex;
		align-items: center;
	}

	.jus {
		display: flex;
		justify-content: center;
	}

	.needtoknow {
		padding: 18rpx;
		border: 2rpx solid #f2f2f2;
		font-style: normal;
		font-size: 28rpx;
		text-align: left;
		line-height: 52rpx;
		color: #333333;
	}

	.allcenter {
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.flex {
		display: flex;
	}

	.flex1 {
		flex: 1;
		/* border: 1px solid red; */
	}

	.sthtitle {
		font-family: 'PingFangSC-Medium', 'PingFang SC Medium', 'PingFang SC', sans-serif;
		font-weight: 500;
		font-style: normal;
		font-size: 30rpx;
		margin: 24rpx 0;
		color: #333333;
	}

	.izpimg img {
		width: 10px;
		height: 10px;
		margin-right: 30px;
	}

	.server1 {
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		color: #757575;
		height: 56px;
		line-height: 56px;
		border-bottom: 1px solid rgba(242, 242, 242, 1);
		font-size: 15px;
	}

	.conttitle {
		background-color: #f5f9ff;
		height: 180rpx;
		display: flex;
		font-weight: 200;
		border: 1px solid #f2f2f2;
		padding: 20px 10px;
		justify-content: space-between;
		margin-top: 15px;
		box-sizing: border-box;
	}

	.mor {
		font-family: 'PingFangSC-Light', 'PingFang SC Light', 'PingFang SC', sans-serif;
		font-weight: 200;
		font-style: normal;
		font-size: 12px;
	}

	.phone {
		font-weight: 200;
		font-style: normal;
		font-size: 12px;
		color: #AAAAAA;
	}

	.name span:nth-child(1) {
		font-family: 'PingFangSC-Regular', 'PingFang SC', sans-serif;
		font-weight: 400;
		font-style: normal;
		font-size: 15px;
		color: #555555;
	}

	.name span:nth-child(2) {
		margin-left: 5px;
		font-size: 12px;
		display: inline-block;
		width: 44px;
		height: 18px;
		padding: 2px;
		background-color: #e2edfe;
		text-align: center;
		line-height: 18px;
		border-radius: 10px;
		letter-spacing: 1px;
		color: #006EFF;
	}

	.weeklist {
		font-weight: 200;
		font-size: 24rpx;
		color: rgb(170, 170, 170);
		text-align: center;
	}

	.date {
		text-align: center;
		background-color: rgba(0, 110, 255, 0.098);
		border-radius: 40px;
		width: 20rpx;
		height: 32px;
		margin: 40rpx 10rpx 40rpx 10rpx;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.tcsection {
		padding: 10rpx;
		border-bottom: 2rpx solid #f2f2f2;
		/* border: 1px solid red; */
	}

	.choosed {
		background-color: rgb(0, 110, 255);
		color: #fff;
	}

	.sourcelist {
		float: left;
		width: calc(33% - 10rpx);
		text-align: center;
		background-color: rgba(0, 110, 255, 0.055);
		border-radius: 8rpx;
		box-shadow: none;
		height: 64rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		margin: 15rpx 0;
	}

	.sourcelistmargin {
		margin: 15rpx;
	}

	.fixedmenu {
		position: fixed;
		left: 0;
		bottom: 0;
		width: 100%;
		/* box-sizing: border-box; */
		/* padding: 0; */
		height: 100rpx;
		border: 2rpx solid #f2f2f2;
		/* border: 2rpx solid red; */
	}

	.nextbtn {
		/* width: 370rpx; */
		height: 100rpx;
		background: inherit;
		background-color: rgba(0, 110, 255, 1);
		font-family: 'PingFangSC-Medium', 'PingFang SC Medium', 'PingFang SC', sans-serif;
		font-weight: 500;
		font-size: 28rpx;
		color: #FFFFFF;
	}

	.total {
		font-family: 'PingFangSC-Regular', 'PingFang SC', sans-serif;
		font-weight: 400;
		font-size: 24rpx;
		/* margin: 40rpx; */
		padding-left: 40rpx;
	}

	.taocanlist {
		font-family: 'PingFangSC-Regular', 'PingFang SC', sans-serif;
		font-weight: 400;
		font-style: normal;
		font-size: 28rpx;
	}

	.right {
		/* text-align: right; */
		margin-left: auto;
		/* border: 1px solid red; */
	}

	.price {
		font-family: 'PingFangSC-Medium', 'PingFang SC Medium', 'PingFang SC', sans-serif;
		font-weight: 500;
		font-size: 32rpx;
		color: #F46363;
	}
</style>